#include <bits/stdc++.h>
using namespace std;
using ll = long long;

void solve() {
	int n;
	cin >> n;
	if (n == 1) {
		cout << -1 << "\n";
		return;
	}

	if (n % 2 == 0) {
		for (int i = 0; i < n / 2; i++) {
			cout << "12";
		}
	} else {
		for (int i = 0; i < n / 2; i++) {
			cout << "13";
		}
		cout << "1";
	}

	cout << " 1";
	for (int i = 0; i < n - 2; i++) {
		cout << 0;
	}
	cout << "1" << "\n";
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	solve();
	return 0;
}